
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
parse-packagejson-name
Advanced tools
Parse an npm package name and returns some mildly interesting details about it
A very simple package to parse an npm package name and return some mildly interesting details about the name. It gives you back the following properties:
@foo/blip.blop
's scope is 'foo'
@foo/blip.blop
's fullName is 'blip.blop'
.
character in the fullName, then this can denote the module is part of a larger project, for example lodash
has modules like lodash.pluck
. Given the @foo/blip.blop
example, projectName would be 'blip'
@foo/blip.blop
, moduleName would be 'blop'
.var parsePackageJsonName = require('parsePackageJsonName');
parsePackageJsonName('@foo/blip.blop').should.deep.equal({
scope: 'foo',
fullName: 'blip.blop',
projectName: 'blip',
moduleName: 'blop',
});
parsePackageJsonName('blip.blop').should.deep.equal({
scope: null,
fullName: 'blip.blop',
projectName: 'blip',
moduleName: 'blop',
});
parsePackageJsonName('blop').should.deep.equal({
scope: null,
fullName: 'blop',
projectName: null,
moduleName: 'blop',
});
parsePackageJsonName(require('lodash.pluck/package.json')).should.deep.equal({
scope: null,
fullName: 'lodash.pluck',
projectName: 'lodash',
moduleName: 'pluck',
});
FAQs
Parse an npm package name and returns some mildly interesting details about it
We found that parse-packagejson-name demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.